<?php

/*******************************************
 *
 * 1. console logger
 *
 *******************************************/ 
$__logger = false;

function open_logger() {
	global $__logger;
	$__logger = true;
}

function logger($msg) {
	global $__logger;
	if ($__logger)
		error_log(date("Y-m-d H:i:s") . " - TRACE - [ " . $msg . " ] \n"); 
}

function log_error($msg) {
	global $__logger;
	if ($__logger)
		echo date("Y-m-d H:i:s") . " - ERROR - [ " . $msg . " ] \n"; 
}

